Tootsville::Infinity-Send-Out-Of-Band-Message

Function

Infinity-Send-Out-Of-Band-Message names a function, with lambda list (D USER RECIPIENT/S):

Send an arbitrary JSON packet to another user, or all of the users

Lisp SEND-OUT-OF-BAND-MESSAGE = JSON sendOutOfBandMessage

Out of the band of communications.

This is neither a public nor a private message in the chat context: just some additional data that is being provided.

@{ sender: sender, from: outOfBand, status: true, body: @{JSON@} @}

Adds "roomTitle" to body if body contains "room" and title can be determined

Add "sendRoomList": "true" to give the user an updated room list as well. (Necessary for invitations to new rooms.) Inviting to houses …

initUserRoom { room: 0, autoJoin: false }
{ from: initUserRoom, status: true, moniker: ROOM-MONIKER } ** OK

=> { from: initUserRoom, status: false, err: exists, moniker: ROOM-MONIKER } ** OK

=> { from: initUserRoom, status: false, err: showFirstRun } ** ERR (player does not have that room)

sendOutOfBandMessage { to: USER-LOGIN, body: { locType: "house", type: "invite", room: MONIKER } }

{ from: outOfBand, sender: YOUR-LOGIN, status: true, body: { locType: "house", type: "invite", room: MONIKER, roomTitle: USER-VISIBLE-NAME } }

for user houses, roomTitle will be like "BlackDaddyNerd's House"

Parameters:

jso - To send to one user: @{ to: userName, body: @{JSON@} @}, or to broadcast to the entire room: @{ toRoom: true, body: @{JSON@} @}

u - The sender of the out-of-band-message

room - The room in which the sender is standing. Necessary for the toRoom version of this method.

Throws:

org.json.JSONException - Thrown if the data cannot be interpreted from the JSON objects passed in, or conversely, if we can't encode a response into a JSON form

File

Defined in file src/infinity/legacy-commands.lisp.